import "./styles/index.scss";
const allComponents = require.context(".", true, /\.vue$/);
const allJs = require.context("./api/", true, /\.js$/);

const res_components = {};
allComponents.keys().forEach((item) => {
  const comp = allComponents(item);
  const name = comp.default.name;
  res_components[name] = comp.default;
});

const apiMap = {}
for (const key of allJs.keys()) {
  const fileKey = key.replace(/\.\/|\.js/g, '');
  apiMap[fileKey] = allJs(key)
}
res_components["Api"] = apiMap;

export default res_components;
